﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace DotNetUI.Controls
{
    public class DotNetAzureNavBarFooter:Control, IIsChecked
    {
        static DotNetAzureNavBarFooter()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DotNetAzureNavBarFooter), new FrameworkPropertyMetadata(typeof(DotNetAzureNavBarFooter)));
        }
        public static readonly DependencyProperty IconBackgroundProperty = DependencyProperty.Register(nameof(IconBackground), typeof(Brush), typeof(DotNetAzureNavBarFooter));
        public static readonly DependencyProperty IconProperty = DependencyProperty.Register(nameof(Icon), typeof(ImageSource), typeof(DotNetAzureNavBarFooter));
        public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register(nameof(Caption), typeof(object), typeof(DotNetAzureNavBarFooter));
        public static readonly DependencyProperty StatusIconProperty = DependencyProperty.Register(nameof(StatusIcon), typeof(ImageSource), typeof(DotNetAzureNavBarFooter));
        /// <summary>
        /// 图标
        /// </summary>
        public ImageSource Icon { get => (ImageSource)this.GetValue(IconProperty); set => SetValue(IconProperty, value); }
        /// <summary>
        /// 标题
        /// </summary>
        public object Caption { get => this.GetValue(CaptionProperty); set => SetValue(CaptionProperty, value); }
        /// <summary>
        /// 扩展元素
        /// </summary>
        public ImageSource StatusIcon { get => (ImageSource)this.GetValue(StatusIconProperty); set => SetValue(StatusIconProperty, value); }
        /// <summary>
        /// 图标背景颜色
        /// </summary>
        public Brush IconBackground { get => (Brush)this.GetValue(IconBackgroundProperty); set => SetValue(IconBackgroundProperty, value); }
        /// <summary>
        /// 是否选中
        /// </summary>
        public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(nameof(IsChecked),typeof(bool),typeof(DotNetAzureNavBarFooter),new PropertyMetadata(false));
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool IsChecked { get=>this.GetValue<bool>(IsCheckedProperty); set=>SetValue(IsCheckedProperty,value); }
    }
    public interface IIsChecked
    {
         bool IsChecked { get; set; }
    }
}
